Fix HTML/JS/CSS issues in Broadcast Registry Mermaid template#17
Merged
Conversation
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Agent-Logs-Url: https://github.com/NEVSTOP-LAB/CSM-Mermaid-Plugin/sessions/4cb8bea6-2090-49ac-9132-1abf87d42ee8 Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
nevstop
April 27, 2026 05:53
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the “Broadcast Registry Mermaid” HTML viewer template to render in standards mode, behave better during zoom interactions, and avoid UI overflow in narrow embedded webviews.
Changes:
- Add HTML5 doctype, document language attribute, and a page title.
- Refine zoom behavior: clamp scale min/max, round per step, and register the wheel handler as non-passive so
preventDefault()is honored. - Constrain the fixed operation tips banner to prevent viewport overflow.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nevstop
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code review of
src/_support/html/Broadcast Registry Mermaid.htmlsurfaced several standards, correctness, and UX issues in the viewer template. Each fix lands as its own commit for easy review.HTML structure
<!DOCTYPE html>,lang="zh", and a<title>so the page renders in standards mode and is properly identified by browsers/AT.JavaScript
navigator.userLanguagefallback in favor ofnavigator.language || 'en'.wheellistener as{ passive: false }sopreventDefault()is honored without the Chrome intervention warning.scaleto one decimal per step to avoid accumulated float drift (e.g.1.0000000000000002).scaleMax = 5/scaleMin = 0.1constants — previously only the lower bound was enforced.DOMContentLoadedhandler whosesetTimeout(..., 100)only re-appliedscale(1)(a no-op) — fragile timing hack with no effect.CSS
.operation-tipswithmax-width: calc(100vw - 30px)andbox-sizing: border-boxso the fixed-position banner doesn't overflow narrow viewports (e.g. embedded LabVIEW WebView).The
%sMermaid graph placeholder filled in by LabVIEW is left untouched.